<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
  mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
  components: {},
  data() {
    return {
      appWindow: window,

      form: {
        templateId: ""
      },

      imgUrl: "",
      show: false
    };
  },
  methods: {
    // 初始化
    async init() {

      this.show = false;

      // 显示窗口
      this.mixinEdit_editVisible = true;
      this.mixinEdit_loading = false;
      this.templateId = "";

    },

   // 点击获取体检版二维码
   async barcode(id){
      this.imgUrl = "";
      this.show = true;

      let _data = await this.$vFN.Http.post(
                {
                    url: "mall-site-portal/wechat-ma-audit/getTestQrcode",
                    data: {
                      templateId: id,
                    }
                },
        window
      );

      if(_data._ok){
        this.imgUrl = _data.data;
      }

    },

  
    // 成功回调
    onSuccess() {},
    // 取消回调
    onCancel() {},
    // 失败回调
    onError() {},
  },
  mounted() {
    this.init();
  },
  activated() {},
};
</script>
